Skip to content

Enforce strict validation for JWT claims - #404

Merged
simo5 merged 1 commit into
latchset:mainfrom
simo5:hardening1
Oct 30, 2026
Merged

simo5 merged 1 commit into
latchset:mainfrom
simo5:hardening1

Conversation

@simo5

@simo5 simo5 commented Oct 30, 2026

Copy link
Copy Markdown
Member

Update claim validation to strictly check that integer claims such as 'exp', 'nbf', and 'iat' are actual integers, rejecting booleans, strings, and other non-integer types. Additionally, disallow null values as an additional validation courtesy for applications that are not passing in actual values to check.

Originally reported as a security issue by @heyash13 but even when the signer pass in null values it was always on the client to check that any of the claims it cared about where matching what they needed. This is just extra validation, but any application that was checking the claims would have failed already on null inputs, and those that did not care checking now may get a spurious failure ... in that case passing a check_claims of False will still allow applications to completely skip claims validation and do it on their own.

Update claim validation to strictly check that integer claims such as
'exp', 'nbf', and 'iat' are actual integers, rejecting booleans,
strings, and other non-integer types. Additionally, disallow null
values as an additional validation courtesy for applications that are
not passing in actual values to check.

Assisted-by: Gemini 3.8 Flash
Signed-off-by: Simo Sorce <simo@detuned.org>
@simo5
simo5 merged commit c11f67a into latchset:main Oct 30, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant